api: Fix pagination for list PublicIPAddresses#5231
Conversation
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 626 |
|
@blueorangutan test |
|
@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
server/src/main/java/com/cloud/server/ManagementServerImpl.java
Outdated
Show resolved
Hide resolved
shwstppr
left a comment
There was a problem hiding this comment.
LGTM. Tested for different cases, correct items and count returned by API.
(localcloud) 🐦 > list publicipaddresses listall=true page=1 pagesize=2
{
"count": 3,
...
(localcloud) 🐧 > list publicipaddresses listall=true page=1 pagesize=2 ipaddress=192.168.2.3
{
"count": 1,
"publicipaddress": [
...
(localcloud) 🦍 > list publicipaddresses listall=true page=1 pagesize=2 allocatedonly=true
{
"count": 3,
...
(localcloud) 🦍 > list publicipaddresses listall=true page=1 pagesize=15 allocatedonly=false filter=id
{
"count": 395,
...
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 628 |
|
@blueorangutan test |
|
@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1351)
|
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 653 |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1379)
|
Description
Fixes: #5229
This PR fixes the issue noticed while listing public IP addresses wrt pagination. The count is set to the number of items being returned as opposed to the total number of entities (here, public IPs)
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
via cmk:
Prior Fix:
Post Fix: